<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8" />
    <title>hello spring boot</title>
    <script type="text/javascript" src="/static/jquery.js"></script>
</head>
<body>
	<select id="i18n">
		<option value="">default</option>
		<option>zh</option>
		<option>en</option>
	</select>
    <p><label th:text="#{welcome}"></label></p>
    
	<script type="text/javascript">
		$(function () {
			var ctx = '';
			
			$('#i18n').change(function () {
				var i18n = $('#i18n').val();
				var url = ctx + '/i18n/' + i18n;
				$.get(url, function () {
					location.reload();
				});
			});
		});
	
	</script>
</body>
</html>